home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1992 June / 1992-06.d64 / demo maker (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  137 lines

  1. 0 if a=0 then clr
  2. 5 rem copyright 1992 - compute publications intl ltd - all rights reserved
  3. 10 rem * compute demo maker v1.0 *
  4. 20 if a=0 then a=1:load"demo.code",8,1
  5. 30 dim c$(15),v(9),r(4)
  6. 40 for x=0 to 15:read a$:c$(x)=a$:next
  7. 50 for x=0 to 9:read a:v(x)=a:next
  8. 60 for x=0 to 44:read a:poke x+32768,a:next
  9. 70 r(0)=1:r(1)=2:r(2)=5:r(3)=6:r(4)=7
  10. 80 t$="yes":s=1185:k$="a":x=0
  11. 90 b$="----------------------------------------"
  12. 100 poke53272,23:poke53281,0:poke53280,11
  13. 110 print"[147][154]      ** [212]he [195][207][205][208][213][212][197]! [196]emo [205]aker **"
  14. 120 print"   [212]itle [204]etters  [195]olor: [153]"c$(v(0))
  15. 130 print"   [211]crolling [212]ext [195]olor: [153]"c$(v(1))
  16. 140 print"   [212]ext on [210]aster [195]olor: [153]"c$(v(2))
  17. 150 print"   [158][205]id [194]ackground [195]olor: [154]"c$(v(3))
  18. 160 print"   [158][204]ow [194]ackground [195]olor: [154]"c$(v(4))
  19. 170 print"   [205]ain [210]aster  [208]art 1: [150]"c$(v(5))" shades"
  20. 180 print"   [205]ain [210]aster  [208]art 2: [150]"c$(v(6))" shades"
  21. 190 print"   [211]mall [210]aster [195]olors: [156]"c$(v(7))" shades"
  22. 200 print"   [205]iddle [198]ader [195]olors: [156]"c$(v(8))" shades"
  23. 210 print"   [159][198]ader [211]peed (0 to 10): [156]"v(9)
  24. 220 print"   [158][193]nimate [212]itle: [153]"t$
  25. 230 print"   [197]nter [212]itle [212]ext"
  26. 240 print"   [197]nter [211]crolling [212]ext"
  27. 250 print"   [197]nter [205]iddle [212]ext"
  28. 260 print"   [159][211][193][214][197] [212][200][197] [196][197][205][207]"
  29. 270 print"[153]    [208][210][197][211][211] [211][208][193][195][197] [212][207] [208][210][197][214][201][197][215] [212][200][197] [196][197][205][207]"
  30. 280 sc=s+x*40:poke sc,62:pokesc+54272,1
  31. 290 get c$:ifc$="" and x<14 then pokesc,32:x=x+1
  32. 300 ifc$="[145]"and x>0 thenpokesc,32:x=x-1
  33. 310 if c$ <> "+" then 350
  34. 320 if x<=4 then if v(x)<15 then v(x)=v(x)+1:goto100
  35. 330 if x=9 then if v(x)<10 then v(x)=v(x)+1:goto100
  36. 340 if x<=8 then if v(x)<7 then 480
  37. 350 if c$ <> "-" then 390
  38. 360 if x<=4 then if v(x)>0 then v(x)=v(x)-1:goto100
  39. 370 if x=9 then if v(x)>0 then v(x)=v(x)-1:goto100
  40. 380 if x<=8 then if v(x)>1 then 500
  41. 390 if x=10 and c$=chr$(13) then 460
  42. 400 if x=11 and c$=chr$(13) then 770
  43. 410 if x=12 and c$=chr$(13) then 640
  44. 420 if x=13 and c$=chr$(13) then 700
  45. 430 if x=14 and c$=chr$(13) then 1100
  46. 440 if c$=" " then poke 18985,2:gosub 940:sys 18098:goto 100
  47. 450 goto 280
  48. 460 ift$="yes" then t$="no":goto100
  49. 470 ift$="no" then t$="yes":goto100
  50. 480 v(x)=v(x)+1:if v(x)=3thenv(x)=5
  51. 490 goto100
  52. 500 v(x)=v(x)-1:if v(x)=4thenv(x)=2
  53. 510 goto100
  54. 520 rem * text input *
  55. 530 m=0
  56. 540 print" [146]";
  57. 550 get c$:ifc$=""then550
  58. 560 print"[157] [157]";:ifc$=chr$(13)then return
  59. 570 ifc$<>chr$(20)then610
  60. 580 if m=0then540
  61. 590 m=m-1:print"[157] [157]";:ifm<1then530
  62. 600 goto540
  63. 610 if c$="[133]"then return
  64. 620 ifm>=le or (c$<" "orc$>"z") then540
  65. 630 m=m+1:printc$;:goto540
  66. 640 rem * scrolling text *
  67. 650 print chr$(147)b$""b$"[158][197]nter the scroll text now."
  68. 660 print"[208]ress <[210][197][212][213][210][206]> to store,  <[198]1> to abort";
  69. 670 for y=16864 to 17263:poke y-15800,peek(y):next:le=398:gosub 520
  70. 680 if c$<>"[133]"then for y=1064 to 1463:poke y+15800,peek(y):poke y,42:next
  71. 690 goto100
  72. 700 rem * middle text *
  73. 710 print chr$(147)b$""b$"[158][197]nter the middle text now.  [198]irst and
  74. 720 [153]"last lines are text on rasters."
  75. 730 [153]"(NULL)ress <(NULL)val(NULL)(NULL)(NULL)(NULL)> to store,  <asc1> to abort";
  76. 740 [129] y[178]16384 [164] 16863:[151] y[171]15320,[194](y):[130]:le[178]479:[141] 520
  77. 750 [139] c$[179][177]"input"[167] [129] y[178]1064 [164] 1543:[151] y[170]15320,[194](y):[151] y,42:[130] y
  78. 760 [137]100
  79. 770 [143] * title *
  80. 780 [153] [199](147)b$""b$"sysvalnter the title letters now."
  81. 790 [151]1084,45:[151]1124,45
  82. 800 [153]"18 (NULL)etters per line (spaces included)"
  83. 810 [153]"(NULL)o punctuation is allowed in title."
  84. 820 [153]"(NULL)ress <(NULL)val(NULL)(NULL)(NULL)(NULL)> at end of each line"
  85. 830 [129] y[178]18341 [164] 18360:p[178]y[171]17277:v[178][194](y):[139] v[179][177]32 [167] v[178]v[171]64
  86. 840 [151]p,v:[130]
  87. 850 [129] y[178]18361 [164] 18380:p[178]y[171]17257:v[178][194](y):[139] v[179][177]32 [167] v[178]v[171]64
  88. 860 [151]p,v:[130]
  89. 870 [153]"";:le[178]19:[141]520
  90. 880 [153]:le[178]19:[141]520
  91. 890 [129] y[178]1064 [164] 1083:p[178]y[170]17277:v[178][194](y):[139] v[179][177]32 [167] v[178]v[170]64
  92. 900 [151]p,v:[151] y,42:[130]
  93. 910 [129] y[178]1104 [164] 1122:p[178]y[170]17257:v[178][194](y):[139] v[179][177]32 [167] v[178]v[170]64
  94. 920 [151]p,v:[151] y,42:[130]
  95. 930 [137]100
  96. 940 [143] * customizer *
  97. 950 [153]"load"
  98. 960 ad[178]18333:[151] ad,v(9):[151] ad[170]1,v(2):[151] ad[170]2,v(0):[151] ad[170]3,v(1)
  99. 970 [151] ad[170]4,0:[139] t$[178]"yes" [167] [151] ad[170]4,1
  100. 980 [151] ad[170]6,v(3):[151] ad[170]7,v(4)
  101. 990 [143] * rastercol *
  102. 1000 y[178]32768:[129] t[178]0 [164] 3:[139] r(t)[179][177]v(7) [167] y[178]y[170]9:[130]
  103. 1010 a[178]18312:[141]1090
  104. 1020 y[178]32768:[129] t[178]0 [164] 3:[139] r(t)[179][177]v(8) [167] y[178]y[170]9:[130]
  105. 1030 a[178]18321:[141]1090
  106. 1040 y[178]32768:[129] t[178]0 [164] 3:[139] r(t)[179][177]v(5) [167] y[178]y[170]9:[130]
  107. 1050 a[178]18264:[129] t[178]y [164] y[170]7:[129] u[178]0 [164] 2:[151] a,[194](t):a[178]a[170]1:[130] u:[130] t
  108. 1060 y[178]32768:[129] t[178]0 [164] 3:[139] r(t)[179][177]v(6) [167] y[178]y[170]9:[130]
  109. 1070 a[178]18288:[129] t[178]y [164] y[170]7:[129] u[178]0 [164] 2:[151] a,[194](t):a[178]a[170]1:[130] u:[130] t
  110. 1080 [142]
  111. 1090 [129] t[178]y [164] y[170]9:[151] a,[194](t):a[178]a[170]1:[130]:[142]
  112. 1100 [143]  * save *
  113. 1110 [141] 940:[133]"load(NULL)hould demo boot another file? ycmdcmdcmd";a$
  114. 1120 [139] a$[178]"n" [167] [151] 18985,2:[137] 1200
  115. 1130 [153]"load"b$"sysvalnter the name of file to boot"
  116. 1140 [153]"((NULL)ype '*' at end of name)":[151]1080,45:le[178]15:[141]520
  117. 1150 [129] y[178]1064 [164] 1079:a[178]y[170]17922:v[178][194](y):[139] v [177] 0 [175] v [179] 27 [167] v[178]v[170]64
  118. 1160 [151] a,v:[130]:[153]
  119. 1170 [133]"openvalnter (NULL)(NULL)(NULL) ((NULL)eturn=peekatn(NULL)right$len)";sy
  120. 1180 [139] sy[178]0 [167] [151]18985,1:[137] 1200
  121. 1190 [151] 18985,0:h[178][181](sy[173]256):l[178]sy[171]256[172]h:[151] 19036,l:[151] 19037,h
  122. 1200 [133]"loadascilename of demo";f$
  123. 1210 [153]"(NULL)aving demo...";
  124. 1220 [159]2,8,2,"0:"[170]f$[170]",p,w"
  125. 1230 [152]2, [199](1);[199](8);
  126. 1240 [129] j[178]16252 [164] 19064:[152]2,[199]([194](j));
  127. 1250 [139] st [177] 0 [167] [153]" valrror during save":[152]2:[160]2:[128]
  128. 1260 [130]:[160]2:[153]" (NULL)o valrrors":[128]
  129. 1270 [131] black,white,red,cyan,purple,green,blue,yellow
  130. 1280 [131] orange,brown,lt red,dk gray,med gray,lt green,lt blue,lt gray
  131. 1290 [131] 0,1,11,0,5,1,2,6,1,5
  132. 1300 [131] 0,11,12,15,1,1,15,12,11
  133. 1310 [131] 0,9,2,8,10,10,8,2,9
  134. 1320 [131] 0,5,3,13,1,1,13,3,5
  135. 1330 [131] 0,6,14,3,1,1,3,14,6
  136. 1340 [131] 10,7,13,3,14,3,13,7,10
  137.